<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://unpkg.com/nes.css@latest/css/nes.min.css" rel="stylesheet" />
    <title>Voting Analysis Online</title>
</head>

<body>
    <div class="nes-container with-title is-centered">
        <p class="title">Questions</p>
        <div class="nes-table-responsive">
            <table class="nes-table is-bordered is-centered">
                <thead>
                    <tr>
                        <th>Question</th>
                        <th>Yes Count</th>
                        <th>No Count</th>
                        <th>Yes Percentage</th>
                        <th>No Percentage</th>
                        <th>Detail</th>
                    </tr>
                </thead>
                <tbody>
                    {% for question in questions %}
                    <tr>
                        <td>{{ question.question }}</td>
                        <td><i class="nes-icon coin is-small"></i>{{ question.yes_count }}</td>
                        <td><i class="nes-icon close is-small"></i>{{ question.no_count }}</td>
                        <td>{{ question.yes_percentage }}%</td>
                        <td>{{ question.no_percentage }}%</td>
                        <td>
                            <a class="nes-btn is-primary"
                                href="{{ url_for('question_detail', qid=question.id)}}">Detail</a>
                        </td>
                    </tr>
                    {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
</body>

</html>